package com.dorado.example.service.impl;

import com.dorado.example.service.IUserService;
import com.dorado.example.vo.UserVo;
import com.dorado.starter.mongodb.annotation.MongoDataSourceSwitch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

@Service("userServiceImpl")
public class UserServiceImpl implements IUserService {
    //@Autowired
    private MongoTemplate mongoTemplate;

    @MongoDataSourceSwitch(value = "admin")
    @Override
    public void insert(UserVo o) {
        mongoTemplate.insert(o);
    }
}
